// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsICookie.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// An optional interface for accessing the HTTP or
    /// javascript cookie object
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("8684966b-1877-4f0f-8155-be4490b96bf7")]
	public interface nsICookie
	{
		
		/// <summary>
        /// the name of the cookie
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetNameAttribute([MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aName);
		
		/// <summary>
        /// the cookie value
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetValueAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aValue);
		
		/// <summary>
        /// true if the cookie is a domain cookie, false otherwise
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetIsDomainAttribute();
		
		/// <summary>
        /// the host (possibly fully qualified) of the cookie
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetHostAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aHost);
		
		/// <summary>
        /// the path pertaining to the cookie
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetPathAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aPath);
		
		/// <summary>
        /// true if the cookie was transmitted over ssl, false otherwise
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetIsSecureAttribute();
		
		/// <summary>
        /// @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead.
        ///
        /// expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC.
        /// expires = 0 represents a session cookie.
        /// expires = 1 represents an expiration time earlier than Jan 1, 1970.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		ulong GetExpiresAttribute();
		
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		System.IntPtr GetStatusAttribute();
		
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		System.IntPtr GetPolicyAttribute();
	}
	
	/// <summary>nsICookieConsts </summary>
	public class nsICookieConsts
	{
		
		// <summary>
        // @DEPRECATED status implementation will return STATUS_UNKNOWN in all cases.
        // </summary>
		public const long STATUS_UNKNOWN = 0;
		
		// 
		public const long STATUS_ACCEPTED = 1;
		
		// 
		public const long STATUS_DOWNGRADED = 2;
		
		// 
		public const long STATUS_FLAGGED = 3;
		
		// 
		public const long STATUS_REJECTED = 4;
		
		// <summary>
        // @DEPRECATED policy implementation will return POLICY_UNKNOWN in all cases.
        // </summary>
		public const long POLICY_UNKNOWN = 0;
		
		// 
		public const long POLICY_NONE = 1;
		
		// 
		public const long POLICY_NO_CONSENT = 2;
		
		// 
		public const long POLICY_IMPLICIT_CONSENT = 3;
		
		// 
		public const long POLICY_EXPLICIT_CONSENT = 4;
		
		// 
		public const long POLICY_NO_II = 5;
	}
}
